/**
 * User: alesj
 * Date: 2005.3.24
 * Time: 14:52:05
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.generalynx.common.data;

import org.springframework.aop.ThrowsAdvice;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;

public class JdbcThrowsAdvice implements ThrowsAdvice {

    protected final Log logger = LogFactory.getLog(getClass());

    public void afterThrowing(Throwable t) {
        logger.error(t.getMessage(), t);
        ThreadJdbcFactoryHolder.clear();
    }

}
